package cn.tedu.web.entity;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author issen
 * @since 2021-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ec_goods")
@ApiModel(value = "Goods对象", description = "商品表")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商品分类ID")
    private Integer cid;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "商品价格")
    private Double price;

    @ApiModelProperty(value = "0:待上架;1:已上架;2:已下架;3:已删除")
    private Integer status;

    @ApiModelProperty(value = "商品图片")
    private String image;

    @ApiModelProperty(value = "商品简介")
    private String introduction;

    @ApiModelProperty(value = "商品详细描述")
    private String description;

    @ApiModelProperty(value = "商品添加数据")
    private LocalDateTime addTime;

    @ApiModelProperty(value = "商品上架时间")
    private LocalDateTime onTime;
    
    @ApiModelProperty(value = "商品附加信息")
    @TableField(exist = false)
    private List<GoodsAddition> additions;

    @ApiModelProperty(value = "商品的类别名称")
    @TableField(exist = false)
    private String categoryName;

    @ApiModelProperty(value = "商品图片列表")
    @TableField(exist = false)
    private List<Image> images;

    @ApiModelProperty(value = "商品图片源列表")
    @TableField(exist = false)
    private List<String> srcList;

}